import instance from '@/utils/request.js'

// 获取评论列表
function commentsList ({ page, response_type }) {
  return instance({
    url: 'mp/v1_0/articles',
    method: 'get',
    params: {
      page,
      response_type
    }
  })
}

//
// 操作评论状态
function commentsStatus ({ article_id, allow_comment }) {
  return instance({
    url: 'mp/v1_0/comments/status',
    method: 'put',
    params: {
      article_id
    },
    data: {
      allow_comment
    }
  })
}
// 抛出
export { commentsList, commentsStatus }
